/*
 * Copyright (c) 2025 EasyAdmin
 * All rights reserved.
 *
 * This file is part of the [EasAdmin] project.
 * Unauthorized copying of this file, via any medium, is strictly prohibited.
 * Proprietary and confidential.
 *
 * Author: EasyAdmin ( 1073602@qq.com )
 * Website: https://www.xhxiao.com
 */
package com.easy.module.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.easy.framework.common.validate.Add;
import com.easy.framework.common.validate.Update;
import com.easy.framework.database.entity.DefaultEntity;
import com.easy.framework.poi.annotation.Excel;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

/**
 * 通知公告表 实体
 *
 * @author EasyAdmin ( 1073602@qq.com )
 * @date 2025-08-21
 */
@Getter
@Setter
@TableName("sys_notice")
public class SysNotice extends DefaultEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 公告ID
     */
    @Excel(name = "公告ID")
    @NotNull(message = "公告ID不能为空", groups = {Update.class})
    @TableId(type = IdType.AUTO)
    private Integer id;


    /**
     * 公告标题
     */
    @Excel(name = "公告标题")
    @NotBlank(message = "公告标题不能为空", groups = {Add.class, Update.class})
    @Size(message = "公告标题长度必须小于50个字", max = 50, groups = {Add.class, Update.class})
    private String title;


    /**
     * 公告类型
     * 字典代码：sys_notice_type
     */
    @Excel(name = "公告类型")
    @NotNull(message = "公告类型不能为空", groups = {Add.class, Update.class})
    private Integer type;


    /**
     * 公告内容
     */
    @Excel(name = "公告内容")
    @Size(message = "公告内容长度必须小于1000个字", max = 1000, groups = {Add.class, Update.class})
    private String content;


    /**
     * 状态
     * 字典代码：sys_common_status
     */
    @Excel(name = "状态")
    @NotNull(message = "状态不能为空", groups = {Add.class, Update.class})
    private Integer status;


    /**
     * 备注
     */
    @Excel(name = "备注")
    @Size(message = "备注长度必须小于255个字", max = 255, groups = {Add.class, Update.class})
    private String remark;

}